package test;

import com.thoughtworks.selenium.*;
import reporting.*;
import util.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class SeleneseTestCaseEx extends SeleneseTestCase {

	public Selenium browser;
	public TestConfiguration tc = TestConfiguration.getInstance();
	public ReportEngineNew repEng;

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		
		//Load properties
		tc.setEnv("_testname", this.getClass().getSimpleName());
		repEng = ReportEngineNew.getInstance();
		
		tc.loadLocalProperties("./src/test/" + this.getClass().getSimpleName());
		
		//Initialize reporting section
		browser = new DefaultSelenium("localhost",
	             4444, "*firefox", "http://hobbes.ontometrics.com/magnetportal/");
		//browser = new DefaultSelenium(tc.getEnv("servername"), Integer.parseInt(tc.getEnv("port")), tc.getEnv("browser"), tc.getEnv("mainurl"));
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		browser.stop();
		tc.deleteLocalAndDynamicEnv();
	}


}
